home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / ftplugin / c.vim < prev    next >
Encoding:
Text File  |  2001-09-22  |  1.1 KB  |  44 lines

  1. " Vim filetype plugin file
  2. " Language:    C
  3. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  4. " Last Change:    2001 Sep 21
  5.  
  6. " Only do this when not done yet for this buffer
  7. if exists("b:did_ftplugin")
  8.   finish
  9. endif
  10.  
  11. " Don't load another plugin for this buffer
  12. let b:did_ftplugin = 1
  13.  
  14. setlocal cindent
  15.  
  16. " Set 'formatoptions' to break comment lines but not other lines,
  17. " and insert the comment leader when hitting <CR> or using "o".
  18. setlocal fo-=t fo+=croql
  19.  
  20. " Set 'comments' to format dashed lists in comments.
  21. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
  22.  
  23. " In VMS C keywords contain '$' characters.
  24. if has("vms")
  25.   setlocal iskeyword+=$
  26. endif
  27.  
  28. set cpo-=C
  29.  
  30. " Win32 can filter files in the browse dialog
  31. if has("gui_win32") && !exists("b:browsefilter")
  32.   if &ft == "cpp"
  33.     let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
  34.     \ "C Header Files (*.h)\t*.h\n" .
  35.     \ "C Source Files (*.c)\t*.c\n" .
  36.     \ "All Files (*.*)\t*.*\n"
  37.   else
  38.     let b:browsefilter = "C Source Files (*.c)\t*.c\n" .
  39.     \ "C Header Files (*.h)\t*.h\n" .
  40.     \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
  41.     \ "All Files (*.*)\t*.*\n"
  42.   endif
  43. endif
  44.